package com.cq.hd.product.api.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.cq.hd.common.serialize.Decimal2Serializer;
import com.cq.hd.product.api.dto.ActiveDiscountSonDto;
import com.cq.hd.product.api.dto.ActiveRedPacketSonDto;
import com.cq.hd.product.api.dto.ActiveStepPriceSonDto;
import com.fasterxml.jackson.annotation.JsonFormat;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class ActiveCollectPageVo implements Serializable {

    @ApiModelProperty(value = "活动id")
    private Long id;

    @ApiModelProperty(value = "商家id")
    private Long businessId;

    @ApiModelProperty(value = "活动编号")
    private String activeNo;

    @ApiModelProperty(value = "活动类型(1-团购活动，2-报名活动，3-外部活动)")
    private Integer activeType;

    @ApiModelProperty(value = "活动标题")
    private String activeTitle;

    @ApiModelProperty(value = "活动图片")
    private String activeImg;

    @ApiModelProperty(value = "活动内容")
    private String content;

//    @ApiModelProperty(value = "补贴设置(0-未设置,1-自动按比例分摊,2-手动设置)")
//    private Integer subsidyState;

    // 活动商品补贴列表
//    @ApiModelProperty(value = "活动商品补贴列表")
//    private List<ActiveGoodsSubsidySonDto> activeGoodsSubsidy;


    @ApiModelProperty(value = "活动价格")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal activePrice;


    @ApiModelProperty(value = "划线价格")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal originPrice;

    @ApiModelProperty(value = "多件多折状态(1-关闭，2-开启)")
    private Integer discountState = 1;

    // 多件多折列表
    @ApiModelProperty(value = "多件多折列表")
    private List<ActiveDiscountSonDto> activeDiscount;

    @ApiModelProperty(value = "活动总库存")
    private Integer totalStock;

    @ApiModelProperty(value = "活动开始时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "活动结束时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "活动有效开始时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime validStartTime;

    @ApiModelProperty(value = "活动有效结束时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime validEndTime;

    @ApiModelProperty(value = "限购数量")
    private Integer limitBuyNum;

    @ApiModelProperty(value = "省份id")
    private Integer provinceId;

    @ApiModelProperty(value = "省份名称")
    private String provinceName;

    @ApiModelProperty(value = "市id")
    private Integer cityId;

    @ApiModelProperty(value = "市名称")
    private String cityName;

    @ApiModelProperty(value = "区县id")
    private Integer countyId;

    @ApiModelProperty(value = "区县名称")
    private String countyName;

    @ApiModelProperty(value = "活动详细地址")
    private String address;

    @ApiModelProperty(value = "分销开启状态(1-关闭，2-开启)")
    private Integer agentState = 1;


    @ApiModelProperty(value = "分销佣金金额")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal commissionAmt;


    @ApiModelProperty(value = "分销佣金比例")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal commissionRate;

    @ApiModelProperty(value = "其他权益")
    private String otherEquity;

    @ApiModelProperty(value = "是否是所有经纪人可推广：1-是，2-否")
    private Integer agentNumState;

    @ApiModelProperty(value = "新人首单红包")
    private ActiveRedPacketSonDto activeRedPacket;

    @ApiModelProperty(value = "是否是阶梯价格(1-否，2-是)")
    private Integer stepPriceState = 1;

    // 阶梯价格列表
    @ApiModelProperty(value = "阶梯价格列表")
    private List<ActiveStepPriceSonDto> activeStepPrices;

    @ApiModelProperty(value = "活动限制的报名人数")
    private Integer enrollNum;

    @ApiModelProperty(value = "报名次数限制(同个用户最多可报名几次)")
    private Integer limitEnrollNum;

    @ApiModelProperty(value = "核销方式(1-线上核销，2-线下核销)")
    private Integer verifyMethod;

    @ApiModelProperty(value = "活动联系电话")
    private String activeMobile;

    @ApiModelProperty(value = "活动客服微信号")
    private String activeWechat;

    @ApiModelProperty(value = "活动链接")
    private String activeUrl;

    @ApiModelProperty(value = "活动状态（1-未发布，2-未开始，3-进行中，4-已结束）")
    private Integer activeState;


    @ApiModelProperty(value = "商家名称")
    private String businessName;

    @ApiModelProperty(value = "商家简称")
    private String businessShortName;

    @ApiModelProperty(value = "商家logo")
    private String logo;

    @ApiModelProperty(value = "购买人数")
    private Integer buyNum = 0;

    @ApiModelProperty(value = "查看人数")
    private Long browseNum = 0L;

    @ApiModelProperty(value = "随机显示用户头像")
    private List<String> avatars;

    @ApiModelProperty(value = "收藏时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime collectTime;

    @ApiModelProperty(value = "GROUP_BUY(拼团)")
    private String promotionType;

    @ApiModelProperty(value = "活动营销标签")
    private String promotionLabel;

}
